import {baseURL,request} from './base';

export const url={
	  upload:baseURL+'common/upload/'
};
export const getCodeImage = (params,callback) => {request('login/image_code',params,callback)};
export const login = (params,callback) => {request('login',params,callback,'post')};
export const upload = (params,callback) => {request('upload',params,callback,'post')};
export const getMenu = (params,callback) => {request('common/getmenu',params,callback)};
export const logout= (params,callback) => {request('common/logout',params,callback)};
export const getSchool= (params,callback) => {request('common/get_school',params,callback)};
export const changeSchool= (params,callback) => {request('common/change_school',params,callback,'post')};

export const log={
	getData:(params,cb)=>request('syslog',params,cb),
}
export const user={//学员管理
	getList:(params,cb)=>request('user',params,cb),
	add:(params,cb)=>request('user/add',params,cb,'post'),
	baoming:(params,cb)=>request('user/baoming',params,cb,'post'),
	checkUser:(params,cb)=>request('user/check_user',params,cb,'post'),//检测用户是否已注册
	modifyProgress:(params,cb)=>request('user/modify_progress',params,cb,'post'),
	edit:(params,cb)=>request('user/edit',params,cb,'post'),
	info:(params,cb)=>request('user/info',params,cb),
	bookList:(params,cb)=>request('user/book_list',params,cb),
	progress:(params,cb)=>request('user/progress',params,cb),
	account:(params,cb)=>request('user/account_log',params,cb)
}
export const coach={//教练管理
	getList:(params,cb)=>request('coach',params,cb),
	add:(params,cb)=>request('coach/add',params,cb,'post'),
	edit:(params,cb)=>request('coach/edit',params,cb,'post'),
	modifyKemu:(params,cb)=>request('coach/modify_kemu',params,cb,'post'),
	info:(params,cb)=>request('coach/info',params,cb),
	bookList:(params,cb)=>request('coach/book_list',params,cb),
	students:(params,cb)=>request('coach/students',params,cb),
	account:(params,cb)=>request('coach/account_log',params,cb),
	leave:(params,cb)=>request('coach/leave_log',params,cb),
}
export const leave={//教练请假
	getList:(params,cb)=>request('leave',params,cb),
	audit:(params,cb)=>request('leave/audit',params,cb,'post'),
}
export const comment={	//评价
	getData:(params,callback)=>request('comment',params,callback),
	update:(params,callback)=>request('comment/update',params,callback,'post'),
	del:(params,callback)=>request('comment/del',params,callback,'post'),
}
export const exam={	//考试
	getData:(params,callback)=>request('exam',params,callback),
	update:(params,callback)=>request('exam/update',params,callback,'post'),
}
export const order={	//订单
	getData:(params,callback)=>request('order',params,callback),
	update:(params,callback)=>request('order/update',params,callback,'post'),
}
export const withdraw={	//提现
	getData:(params,callback)=>request('withdraw',params,callback),
	update:(params,callback)=>request('withdraw/update',params,callback,'post'),
}
export const taocan={	//套餐
	getData:(params,callback)=>request('taocan',params,callback),
	add:(params,callback)=>request('taocan/add',params,callback,'post'),
	update:(params,callback)=>request('taocan/update',params,callback,'post'),
	del:(params,callback)=>request('taocan/del',params,callback,'post'),
}
export const shixue={	//试学
	getData:(params,callback)=>request('shixue',params,callback),
	update:(params,callback)=>request('shixue/update',params,callback,'post'),
	del:(params,callback)=>request('shixue/del',params,callback,'post'),
}
export const administrator={	//套餐
	getData:(params,callback)=>request('administrator',params,callback),
	getNode:(params,callback)=>request('administrator/auth_node',params,callback),
	add:(params,callback)=>request('administrator/insert',params,callback,'post'),
	edit:(params,callback)=>request('administrator/update',params,callback,'post'),
	del:(params,callback)=>request('administrator/del',params,callback,'post'),
}
export const yueche={	//约车记录
	getData:(params,callback)=>request('yueche',params,callback),
	search:(params,callback)=>request('yueche/search',params,callback,'post'),
}
export const setting={	//驾校支付设置
	getData:(params,callback)=>request('setting',params,callback),
	add:(params,callback)=>request('setting/add',params,callback,'post'),
	update:(params,callback)=>request('setting/update',params,callback,'post'),
}

//报名
export const baoming={
	getData:(params,cb)=>request('baoming/select',params,cb),
    tabs:(params,callback)=>request('baoming/tabs',params,callback,'post'),
    pt_remark:(params,callback)=>request('baoming/pt_remark',params,callback,'post'),
    pt_color:(params,callback)=>request('baoming/pt_color',params,callback,'post'),
}
//驾校车辆:
export const car={
	select:(params,callback)=>request('jxbus/select',params,callback,'post'),
	popup:(params,callback)=>request('jxbus/popup_action',params,callback,'post'),
	modify:(params,callback)=>request('jxbus/modify',params,callback,'post'),
	car_adds:(params,callback)=>request('jxbus/car_adds',params,callback,'post'),
	insert:(params,callback)=>request('jxbus/car_insert',params,callback,'post'),
	del:(params,callback)=>request('jxbus/dels',params,callback,'post'),
	pl_del:(params,callback)=>request('jxbus/pl_del',params,callback,'post'),
}
//优惠券
export const coupon={
	select:(params,callback)=>request('coupon/select',params,callback),
	modify:(params,callback)=>request('coupon/modify',params,callback,'post'),
	add:(params,callback)=>request('coupon/pt_add',params,callback,'post'),
}
